/**
 * User: alesj
 * Date: 2005.2.10
 * Time: 11:21:42
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.common.data.dao;

import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * Transactions only apply on methods begining with
 * get*, select*, insert*, update*, delete*, procedure*.
 */
public interface ISqlDAO {

    public static final String sqlDAO = "sqlDAO";

    /* default methods */

    public Object get(String statementName, int id) throws DataAccessException;
    public Object insert(String statementName, Object object) throws DataAccessException;
    public int update(String statementName, Object object) throws  DataAccessException;
    public int delete(String statementName, Object object) throws DataAccessException;
    public List select(String statementName, Object object) throws DataAccessException;

    public Map selectForMap(String statementName, Object object, String keyProp) throws DataAccessException;
    public Object procedureObject(String statementName, Map params) throws DataAccessException;
    public List procedureList(String statementName, Map params) throws DataAccessException;

}
